package com.example.callcenter.controller;

import com.example.callcenter.dto.SmsDTO;
import com.example.callcenter.service.SmsService;
import com.example.callcenter.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sms")
public class SmsController {

    @Autowired
    private SmsService smsService;

    @PostMapping("/send")
    public ResultUtil sendSms(@RequestBody SmsDTO smsDTO) {
        smsService.sendSms(smsDTO);
        return ResultUtil.success("短信发送中");
    }
}